<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../admin/authority.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@include file="headScriptSM.jsp"%>

<%
	java.util.Date date = new java.util.Date();
%>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/share/componentAPI.js?tick=<% out.println(date.toString()); %>"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/sm/cs11012script.js?tick=<% out.println(date.toString()); %>"></script>

</head>
<body>
<input type="hidden" id="url_address" name="url_address" value="">
<input type="hidden" id="agent_browser" name="agent_browser" value="">
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
			<!-- End SIDEMENU-->

			<!-- BEGIN RIGHT DETAIL-->
			<div class="col-sm-12 col-xs-12" id="right-side">
				<div id="navigator-bar">
					<i class="fa fa-home"></i> หน้าหลัก <i
						class="fa fa-angle-right ml-5 mr-5"></i> บันทึกข้อมูลที่อยู่
				</div>
				<!--End navigator-bar-->
				<div>
					<div id="page-header" class="clearfix">
						<div>บันทึกข้อมูลที่อยู่</div>
					</div>
					
					<!-- ### Error / Success Message ### -->
					<div id="success_message" class="alert alert-success hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-check fa-stack-1x fa-inverse"></i> </span><span id="content_sucess"></span></div>
					<div id="error_message" class="alert alert-danger hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-times fa-stack-1x fa-inverse"></i></span><span id="content_error"></span></div>
				
					<div class="container-fluid">
						<div class="col-xs-10 col-xs-offset-1">
							<fieldset class="mt-20">
								<legend>บันทึกข้อมูลที่อยู่</legend>
								<div class="row form-group">
									<div class="col-xs-10">
										<div class="col-xs-4 text-right">
											<label id="#">ตำบล</label><span class="comment">*</span>
										</div>
										<div class="col-xs-6">
											<select class="form-control" id="inputContactCityCode" name="contact_city_code">
												<option value="">-- เลือกตำบล --</option>
											</select>
										</div>
									</div>
								</div>
								<div class="row form-group">
									<div class="col-xs-10">
										<div class="col-xs-4 text-right">
											<label id="#">อำเภอ</label><span class="comment">*</span>
										</div>
										<div class="col-xs-6">
											<select class="form-control" id="inputContactDistrictCode" name="contact_district_code">
												<option value="">-- เลือกอำเภอ --</option>
											</select>
										</div>
									</div>
								</div>
								<div class="row form-group">
									<div class="col-xs-10">
										<div class="col-xs-4 text-right">
											<label id="#">จังหวัด</label><span class="comment">*</span>
										</div>
										<div class="col-xs-6">
											<select class="form-control" id="inputContactProvinceCode" name="contact_province_code">
												<option value="">-- เลือกจังหวัด --</option>
											</select>
										</div>
									</div>
								</div>
								<div class="row form-group">
									<div class="col-xs-10">
										<div class="col-xs-4 text-right">
											<label id="#">รหัสไปรษณีย์</label><span class="comment">*</span>
										</div>
										<div class="col-xs-6">
											<input type="text" class="form-control" placeholder="รหัสไปรษณีย์" id="inputPostCode" />
										</div>
									</div>
								</div>
								<hr />
								<div class="row form-group">
									<div class="col-xs-12 text-center">
										<button type="button" class="btn btn-primary" id="btnSave">
											<span class="fa fa-floppy-o"></span>&nbsp;<span id="btnSaveSpan">บันทึก</span> 
										</button>
										<button type="button" class="btn btn-danger" id="btnDelete">
											<span class="glyphicon glyphicon-trash"></span> ลบ
										</button>
										<button type="button" class="btn btn-primary" id="#"
											onclick="window.location.reload()">
											<span class="glyphicon glyphicon-refresh"></span> เริ่มใหม่
										</button>
									</div>
								</div>
							</fieldset>
						</div>
					</div>
				</div>
				<!-- END DETAIL-AREA -->
				
				
				<!-- Modal Popup -->
				<div class="modal fade" id="confirmUpdateModal" tabindex="-1"
					role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					<div class="modal-dialog" style="width: 400px;">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"
									aria-hidden="true">&times;</button>
								<h4 class="modal-title">บันทึกข้อมูลที่อยู่</h4>
							</div>
							<div class="modal-body">
								<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
								
								<span id="modal_content_confirmUpdateModal"></span>
							</div>
							<div class="modal-footer">
								<button onclick="SaveCommand()" type="button"
									class="btn btn-primary"><i class="fa fa-floppy-o"></i> บันทึก</button>								
								<button onclick="cancel()" type="button"
									class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
							</div>
						</div>
					</div>
				</div>
				<div class="modal fade" id="confirmSaveModal" tabindex="-1"
					role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					<div class="modal-dialog" style="width: 400px;">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"
									aria-hidden="true">&times;</button>
								<h4 class="modal-title">บันทึกข้อมูลที่อยู่</h4>
							</div>
							<div class="modal-body">
								<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
								
								<span id="modal_content_confirmSaveModal"></span>
							</div>
							<div class="modal-footer">
								<button onclick="SaveCommand()" type="button"
									class="btn btn-primary"><i class="fa fa-floppy-o"></i> บันทึก</button>						
								<button onclick="cancel()" type="button"
									class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
							</div>
						</div>
					</div>
				</div>
				<div class="modal fade" id="confirmModal" tabindex="-1"
					role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					<div class="modal-dialog" style="width: 400px;">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"
									aria-hidden="true">&times;</button>
								<h4 class="modal-title">ลบข้อมูลที่อยู่</h4>
							</div>
							<div class="modal-body">
								<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
								
								<span id="modal_content_confirmModal"></span>
							</div>
							<div class="modal-footer">
								<button onclick="DeleteCommand()" type="submit"
									class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>								
								<button onclick="cancel()" type="button"
									class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
							</div>
						</div>
					</div>
				</div>
				<!-- End Modal Popup -->
				
				
				<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดยการประปานครหลวง</div>
				<!-- END FOOTER -->
			</div>
			<!-- END RIGHT DETAIL-->
		</div>
	</div>
</body>
</html>